package com.lh7.ledger.controller;

import com.lh7.ledger.mapper.LedgerRecordsMapper;
import com.lh7.ledger.mapper.LedgersMapper;
import com.lh7.ledger.pojo.LedgerFields;
import com.lh7.ledger.pojo.LedgerRecords;
import com.lh7.ledger.pojo.Ledgers;
import com.lh7.ledger.service.ILedgerRecordsService;
import com.lh7.ledger.service.ILedgersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lh7
 * @since 2025-07-01
 */
@RestController
@RequestMapping("/ledgerRecords")
public class LedgerRecordsController {
    @Autowired
    private ILedgerRecordsService ledgerRecordsService;

    @GetMapping("/selectAll")
    public ResponseEntity<List<LedgerRecords>> selectAll() {
        return ResponseEntity.ok(ledgerRecordsService.selectAll());
    }
}
